<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Gremlins: Network::GridTcpConnection&lt; MessageRequest, MessageResponse &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Gremlins
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_network.html">Network</a></li><li class="navelem"><a class="el" href="class_network_1_1_grid_tcp_connection.html">GridTcpConnection</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Network::GridTcpConnection&lt; MessageRequest, MessageResponse &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Wrapper around boost TCP socket API Messages model must be specified.  
 <a href="class_network_1_1_grid_tcp_connection.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_grid_tcp_connection_8h_source.html">GridTcpConnection.h</a>&gt;</code></p>

<p><a href="class_network_1_1_grid_tcp_connection-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ab7b81221e3dd53c656855d3ffe88d256"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>MESSAGE_TYPE</b> { <b>REQUEST</b>, 
<b>RESPONSE</b>
 }</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af32ec536d24ab4bb6686bb0b34f8aae3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af32ec536d24ab4bb6686bb0b34f8aae3"></a>
tcp::socket &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#af32ec536d24ab4bb6686bb0b34f8aae3">GetSocket</a> ()</td></tr>
<tr class="memdesc:af32ec536d24ab4bb6686bb0b34f8aae3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter for the connection socket. <br/></td></tr>
<tr class="memitem:aa6f6b2476598a51efa1306ed43428848"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6f6b2476598a51efa1306ed43428848"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#aa6f6b2476598a51efa1306ed43428848">Start</a> ()</td></tr>
<tr class="memdesc:aa6f6b2476598a51efa1306ed43428848"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the connection (socket switch to listen mode) <br/></td></tr>
<tr class="memitem:a02f3544ef2011def6fff384142c5bd4b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02f3544ef2011def6fff384142c5bd4b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a02f3544ef2011def6fff384142c5bd4b">Stop</a> ()</td></tr>
<tr class="memdesc:a02f3544ef2011def6fff384142c5bd4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the connection (close the socket) <br/></td></tr>
<tr class="memitem:a1dd787e5ca70afc7a817904f12bbfb8e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dd787e5ca70afc7a817904f12bbfb8e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a1dd787e5ca70afc7a817904f12bbfb8e">Write</a> (void *message, MESSAGE_TYPE type)</td></tr>
<tr class="memdesc:a1dd787e5ca70afc7a817904f12bbfb8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a message on the socket. <br/></td></tr>
<tr class="memitem:ae3f283554281e7469091ced1d4efd59e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3f283554281e7469091ced1d4efd59e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>GridTcpConnection</b> (asio::io_service &amp;io_service, <a class="el" href="class_network_1_1_behavior_handler.html">BehaviorHandler</a>&lt; MessageRequest, MessageResponse &gt; *h)</td></tr>
<tr class="memitem:a8cbe38b2c7a17c1fda1f25255931ab6e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8cbe38b2c7a17c1fda1f25255931ab6e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a8cbe38b2c7a17c1fda1f25255931ab6e">IsTaskSent</a> ()</td></tr>
<tr class="memdesc:a8cbe38b2c7a17c1fda1f25255931ab6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is a task being proceed by connected client? <br/></td></tr>
<tr class="memitem:a0bf1e8373ea6e55019157fe0096d6dec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bf1e8373ea6e55019157fe0096d6dec"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a0bf1e8373ea6e55019157fe0096d6dec">SendTaskSent</a> (bool sent)</td></tr>
<tr class="memdesc:a0bf1e8373ea6e55019157fe0096d6dec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag the connection as being busy. <br/></td></tr>
<tr class="memitem:a1ac75642c6b0e7e626213607c615789e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ac75642c6b0e7e626213607c615789e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a1ac75642c6b0e7e626213607c615789e">CheckIsAlive</a> ()</td></tr>
<tr class="memdesc:a1ac75642c6b0e7e626213607c615789e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the connection is alive (try to write on the socket). <br/></td></tr>
<tr class="memitem:a82c95d76f7e680a4bd84872a9e43e72c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a82c95d76f7e680a4bd84872a9e43e72c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a82c95d76f7e680a4bd84872a9e43e72c">IsActive</a> ()</td></tr>
<tr class="memdesc:a82c95d76f7e680a4bd84872a9e43e72c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the connection alive. <br/></td></tr>
<tr class="memitem:a1044f005ed311e24680f8fb7dcbd6318"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1044f005ed311e24680f8fb7dcbd6318"></a>
std::string *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a1044f005ed311e24680f8fb7dcbd6318">GetName</a> ()</td></tr>
<tr class="memdesc:a1044f005ed311e24680f8fb7dcbd6318"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter on the connection name. <br/></td></tr>
<tr class="memitem:a7236c6ac291df030f5dab9a4c0365da9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7236c6ac291df030f5dab9a4c0365da9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="class_network_1_1_grid_tcp_connection.html">GridTcpConnection</a>&lt; MessageRequest, MessageResponse &gt; &amp;connection)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a3e60a2b7b54de8586b08eb7d4f6672b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e60a2b7b54de8586b08eb7d4f6672b5"></a>
static boost::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_network_1_1_grid_tcp_connection.html">GridTcpConnection</a><br class="typebreak"/>
&lt; MessageRequest, <br class="typebreak"/>
MessageResponse &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_network_1_1_grid_tcp_connection.html#a3e60a2b7b54de8586b08eb7d4f6672b5">Create</a> (asio::io_service &amp;io_service, <a class="el" href="class_network_1_1_behavior_handler.html">BehaviorHandler</a>&lt; MessageRequest, MessageResponse &gt; *handler)</td></tr>
<tr class="memdesc:a3e60a2b7b54de8586b08eb7d4f6672b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new connection (boost::shared pointer) <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class MessageRequest, class MessageResponse&gt;<br/>
class Network::GridTcpConnection&lt; MessageRequest, MessageResponse &gt;</h3>

<p>Wrapper around boost TCP socket API Messages model must be specified. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>gremlins_static/<a class="el" href="_grid_tcp_connection_8h_source.html">GridTcpConnection.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jul 4 2012 10:52:48 for Gremlins by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
